<template>
  <el-cascader
    v-model="formValue"
    v-bind="$attrs"
    v-on="$listeners"
    :props="$attrs.props.props"
  ></el-cascader>
</template>

<script>
export default {
  name: "form-cascader",
  model: {
    prop: "value", // 绑定的值，通过父组件传递
    event: "update",
  },
  props: ["value"],
  computed: {
    formValue: {
      get() {
        return this.value;
      },
      set(val) {
        this.$emit("update", val);
      },
    },
  },
};
</script>

<style lang="scss" scoped></style>
